﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace OPDSView
{
    class XmlHelper
    {
        public static string GetInnerText (XmlNode node, string defaultStr)
        {
            string ret = defaultStr;
            if (node != null) return node.InnerText;
            return ret;
        }

        public static string GetAttribute(XmlNode node, string attribName, string defaultStr)
        {
            string ret = defaultStr;
            if (node != null)
            {
                return node.Attributes[attribName].Value;
            }
            return ret;
        }
    }
}
